<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<link href="../css/iconfont.css" rel="stylesheet" />
    	<link href="../css/myaddress.css" rel="stylesheet" />
    	<link href="../css/indexlist.css" rel="stylesheet" />
    	<script src="../js/jquery-1.9.1.min.js"></script>
    	<style>
			html,
			body {
				height: 100%;
				/*overflow: hidden;*/
			}
			.mui-bar {
				-webkit-box-shadow: none;
				box-shadow: none;
			}
		</style>
	</head>

	<body>
		
		<!--  顶部组件      -->
		<header class="mui-bar mui-bar-nav head">
			<a class="fanhui" data-href="wode.html">
				<span class="mui-icon mui-icon-arrowleft sp5"></span>
			</a>
			<h1 class="mui-title">地址管理</h1>
		</header>
		<nav id="nav" class="mui-bar mui-bar-tab">
			<button data-href="xinzengdizhi.html" type="button" class="mui-btn mui-btn-danger">新增收货地址</button>			
		</nav>
		<!--  主题内容组件     -->
		<div id="content" class="mui-content">
			<!--<div class="per">
				<ul>
					<li>
						<p class="p_name">
							<span style="float: left;">
								<i class="iconfont icon-ren-copy"></i>
								<span>海明明</span>
							</span>
							<span style="float: right;">
								<i class="iconfont icon-phone"></i>
								<span>18670898811</span>
							</span>
						</p>
						<div style="clear: both;"></div>
						<p style="margin-top: 10px; color: #666; font-size: 15px;">珠海市珠海区来广营北路168号海诚商城</p>
					</li>
				</ul>
			</div>
			<div class="bianji">
				<input name="radio1" type="radio">
				<label>设为默认地址</label>
				<div class="bianji_one">
					<a href="">
						<button type="button" class="mui-btn">编辑</button>
					</a>
					<button type="button" class="mui-btn">删除</button>
				</div>
			</div>-->
			<!--<div class="per">
				<ul>
					<li>
						<p class="p_name">
							<span style="float: left;">
								<i style="margin-right: 5px;" class="iconfont icon-ren-copy"></i>
								<span>海明明</span>
							</span>
							<span style="float: right;">
								<i class="iconfont icon-phone"></i>
								<span>186****8811</span>
							</span>
						</p>
						<div style="clear: both;"></div>
						<p style="margin-top: 10px; color: #666; font-size: 15px;">珠海市珠海区来广营北路168号海诚商城</p>
					</li>
				</ul>
			</div>
			<div class="bianji">
				<input name="radio1" type="radio">
				<label>设为默认地址</label>
				<div class="bianji_one">
					<button id="bianji" type="button" class="mui-btn">编辑</button>
					<button id="delect" type="button" class="mui-btn">删除</button>
				</div>
			</div>-->
			
		</div>
		<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/indexlist.js"></script>
		<script type="text/javascript">
			mui.init()
			document.getElementsByClassName('mui-btn-danger')[0].addEventListener("tap", function() {
				urlid = this.getAttribute("data-href");
				mui.openWindow({
					url: urlid,
					id: urlid,
					waiting: {
						autoShow: false
					}
				});
			});
			//物理返回按钮返回
			document.getElementsByClassName('fanhui')[0].addEventListener("tap", function() {
				urlid = this.getAttribute("data-href");
				alert(urlid)
				mui.openWindow({
					url: urlid,
					id: urlid,
					waiting: {
						autoShow: false
					}
				});
			});
		</script>
		<script>
			$.getJSON("../json/myadress.json",function(data){
				var dizhi_list ="";
				$.each(data,function(infoIndex,info){
//					alert(info.img_list)
					dizhi_list +='<div class="per"><ul><li>';
					dizhi_list +='<p class="p_name">';
					dizhi_list +='<span style="float: left;">';
					dizhi_list +='<i style="margin-right: 5px;" class="iconfont icon-ren-copy"></i>';
					dizhi_list +='<span>' + info.name + '</span>';
					dizhi_list +='</span>';
					dizhi_list +='<span style="float: right;">';
					dizhi_list +='<i style="margin-right: 4px;" class="iconfont icon-phone"></i>';
					dizhi_list +='<span>' + info.phone_number + '</span>';
					dizhi_list +='</span></p>';
					dizhi_list +='<div style="clear: both;"></div>';
					dizhi_list +='<p style="margin-top: 10px; color: #666; font-size: 15px;">' + info.dizhi + '</p>';
					dizhi_list +='</li></ul></div>';
					dizhi_list +='<div class="bianji">';
					dizhi_list +='<input style="margin-right: 4px;" name="radio1" type="radio">';
					dizhi_list +='<label>设为默认地址</label>';
					dizhi_list +='<div class="bianji_one">';
					dizhi_list +='<a href="">';
					dizhi_list +='<button type="button" class="mui-btn">编辑</button>';
					dizhi_list +='</a>';
					dizhi_list +='<button style="margin-left: 6px;" type="button" class="mui-btn">删除</button>';
					dizhi_list +='</div></div>';
				});
				$("#content").append(dizhi_list);
			});
		</script>
	</body>

</html>
